<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" style="height: 100%">
<body class="body_hei edit">
<div th:replace="include/head.html::html"></div>
<div class="layui-form" lay-filter="layuiadmin-form-useradmin" id="layuiadmin-form-useradmin"
     style="padding: 20px 0 0 0;background-color: #FFFFFF;height: 100%">
    <input type="hidden" name="tableName" th:value="${tableName}">
    <div class="layui-form-item">
        <label class="layui-form-label">模块名:</label>
        <div class="layui-input-block">
            <input id="moduleName" type="text" name="moduleName" lay-verify="required" autocomplete="off"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-hide">
        <input type="button" lay-submit lay-filter="submit" id="submit" value="确认">
    </div>
</div>
<script type="text/javascript" th:inline="javascript">
    layui.use(['jquery', 'form'], function () {
        var $ = layui.$;
        var tableName = [[${tableName}]];
        var list = tableName.split('_');
        var res = "";
        for (let i = 1; i < list.length; i++) {
            res += list[i].substring(0,1).toUpperCase() + list[i].substring(1,list[i].length);
        }
        $("#moduleName").val(res);
    });
</script>
</body>
</html>